Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use crypto/rand.Read instead of deprecated math/rand.Read #16459

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

jmhbnz
Copy link
Member

@jmhbnz jmhbnz commented Aug 22, 2023

We recently updated to golang 1.20. This golang release deprecated math/rand.Seed (which in most cases can now be removed) and math/rand.Read in favor of crypto/rand.Read, refer: https://go.dev/doc/go1.20

In #16447 we removed instances of math/rand.Seed.

After scanning through the codebase this pull request updates the one instance I could find of us using math/rand.Read and replaces it with crypto/rand.Read.

Signed-off-by: James Blair <mail@jamesblair.net>
@jmhbnz jmhbnz marked this pull request as ready for review August 22, 2023 11:05
Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

thx @jmhbnz

@ahrtr ahrtr merged commit 29bfdd1 into etcd-io:main Aug 22, 2023
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants